#ifndef HTTPD_INCLUDE_HTTP_RESPOND_H
#define HTTPD_INCLUDE_HTTP_RESPOND_H

#include "common.h"

struct http_respond
{
    int data_length;
    void *data;    
    char *redirect;
    struct key_value_pair *header;
    struct key_value_pair *attribute;
};

extern struct http_respond *create_http_respond(void);
extern void destroy_http_respond(struct http_respond *respond);
extern void set_attribute(struct http_respond *respond, char *name, char *value);
extern void set_header(struct http_respond *respond, char *name, char *value);
extern void set_redirect(struct http_respond *respopnd, const char *path);
extern void *respond_write(struct http_respond *respond, void *data, int size);

#endif  /* HTTP_INCLUDE_HTTP_RESPOND_H */
